namespace net.podhola.gtd.controllers

import System
import System.Configuration
import System.Web
import System.Web.UI
import System.Web.UI.WebControls
import Castle.MonoRail.Framework
import net.podhola.gtd.finances

[Layout("default")]
class GTDParentController(net.podhola.controllers.ParentController):
	def constructor():
		super()
		PropertyBag["Title"] = Title()
		PropertyBag["AllExpenses"] = GetAllExpenses()
		PropertyBag["AllBills"] = GetAllBills()
		PropertyBag["AllAccounts"] = GetAllAccounts()
		PropertyBag["WelcomeNumber"] = GetWelcomeNumber()
		PropertyBag["WelcomeText"] = GetWelcomeText()
		PropertyBag["WelcomeUrl"] = GetWelcomeUrl()

	public override def Title():		
		return ""

	public override def Index():		
		super.Index()		

	public def GetAllExpenses() as (Expense):
		allExpenses = Expense.FindAll()
		return allExpenses

	public def GetAllBills() as (EnteredBill):
		allBills = EnteredBill.FindAll()
		return allBills

	public def GetAllAccounts() as (Account):
		allAccounts = Account.FindAll()
		return allAccounts

	virtual def GetWelcomeNumber() as string:
		return "0"
		
	virtual def GetWelcomeText() as string:
		return ""

	virtual def GetWelcomeUrl() as string:
		return ""
